/*

*** This do file creates the replication results for 

Natural Resources and Civil War: Another Look with New Data (with Indra De Soysa), Conflict Management and Peace Science, 24(3), 2007, pp. 201-218

Eric Neumayer (LSE)																			

Please report any errors to e.neumayer@lse.ac.uk

*/


clear

* Correlations among main measures
set mem 100m

use Fearon2005JCRdataWBformat.dta, clear
quietly logit chonset    mineralrentsgniweb  energyrentsgniweb  lgdpl igy5 ipeace igeogia lpopl ifrac ietdom if energyrentsgniweb<1 & mineralrentsgniweb>=0
corr sxp mineralrentsgniweb energyrentsgniweb  if e(sample) 

use Fearon2005JCRdataWBformat.dta, clear
quietly logit chonset    mineralrentsgniweb  energyrentsgniweb  lgdpl igy5 ipeace igeogia lpopl ifrac ietdom if energyrentsgniweb<1 & mineralrentsgniweb>=0
corr Oil mineralrentsgniweb energyrentsgniweb  if e(sample) 

* Table 1
use Fearon2005JCRdata.dta, clear
quietly logit chonset    isxp isxp2 lgdpl igy5 ipeace igeogia lpopl ifrac ietdom 
su chonset isxp lgdpl igy5 ipeace igeogia lpopl ifrac ietdom if e(sample)
use Fearon2005JCRdataWBformat.dta, clear
quietly logit chonset    mineralrentsgniweb  energyrentsgniweb  lgdpl igy5 ipeace igeogia lpopl ifrac ietdom if energyrentsgniweb<1 & mineralrentsgniweb>=0
su  mineralrentsgniweb energyrentsgniweb  if e(sample) 

use FearonLaitin2003APSRdata.dta, clear
quietly logit onset Oil warl  gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac  anocl deml 
su onset warl Oil gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac anocl deml if e(sample)
use FearonLaitin2003APSRdataextended.dta, clear
quietly logit civwaronsetnewwars Oil priorcivwar gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac  anocl deml 
su civwaronsetnewwars priorcivwar if e(sample)
quietly logit onset mineralrentsgniweb energyrentsgniweb warl  gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac anocl deml if energyrentsgniweb<=1 & mineralrentsgniweb>=0
su  mineralrentsgniweb energyrentsgniweb  if e(sample)

* Table 2
use Fearon2005JCRdata.dta, clear
logit warsa sxp sxp2 lngdp_ gy1 peace geogia lnpop frac etdo4590 
outreg using c:\table2, 3aster replace
su warsa if e(sample)
logit chonset isxp isxp2 lgdpl igy5 ipeace igeogia lpopl ifrac ietdom  
outreg using c:\table2, 3aster append
su chonset if e(sample)
use Fearon2005JCRdataWBformat.dta, clear
logit chonset    mineralrentsgniweb  energyrentsgniweb  lgdpl igy5 ipeace igeogia lpopl ifrac ietdom if energyrentsgniweb<1 & mineralrentsgniweb>=0
outreg using c:\table2, 3aster append
su chonset if e(sample)
logit chonset    mineralrentsgniweb  mineralrentsgniweb2 energyrentsgniweb  energyrentsgniweb2  lgdpl igy5 ipeace igeogia lpopl ifrac ietdom  if energyrentsgniweb<1 & mineralrentsgniweb>=0
outreg using c:\table2, 3aster append
su chonset if e(sample)


* Table 3
use FearonLaitin2003APSRdata.dta, clear
logit onset Oil warl  gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac  anocl deml 
outreg using c:\table3, 3aster replace
su onset if e(sample)
use FearonLaitin2003APSRdataextended.dta, clear
logit onset mineralrentsgniweb energyrentsgniweb warl  gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac anocl deml if energyrentsgniweb<=1 & mineralrentsgniweb>=0
outreg using c:\table3, 3aster append
su onset if e(sample)
logit onset mineralrentsgniweb mineralrentsgniweb2 energyrentsgniweb energyrentsgniweb2 warl  gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac anocl deml if energyrentsgniweb<=1 & mineralrentsgniweb>=0
outreg using c:\table3, 3aster append
su onset if e(sample)
logit onset Oil warl  gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac  anocl deml if e(sample)
outreg using c:\table3, 3aster append
su onset if e(sample)

* Table 4
logit uponsetbulhaug Oil upwar_lagbulhaug gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac  anocl deml 
outreg using c:\table4, 3aster replace
su uponsetbulhaug if e(sample)
logit uponsetbulhaug mineralrentsgniweb energyrentsgniweb upwar_lagbulhaug gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac anocl deml if energyrentsgniweb<=1 & mineralrentsgniweb>=0
outreg using c:\table4, 3aster append
su uponsetbulhaug if e(sample)
logit uponsetbulhaug mineralrentsgniweb mineralrentsgniweb2 energyrentsgniweb energyrentsgniweb2 upwar_lagbulhaug gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac anocl deml if energyrentsgniweb<=1 & mineralrentsgniweb>=0
outreg using c:\table4, 3aster append
su uponsetbulhaug if e(sample)
logit uponsetbulhaug Oil upwar_lagbulhaug gdpenl  lpopl1  lmtnest ncontig nwstate instab ethfrac relfrac  anocl deml if e(sample)
outreg using c:\table4, 3aster append
su uponsetbulhaug if e(sample)
